package com.whiteape.book.model.dto;

import com.whiteape.book.model.bo.BaseMediaInfoBean;
import com.whiteape.book.utils.GsonUtils;

import org.greenrobot.greendao.converter.PropertyConverter;

import java.io.Serializable;
import java.util.Map;

public class SiteSourceHomepageRuleBean extends BaseMediaInfoBean implements PropertyConverter<SiteSourceHomepageRuleBean, String>, Serializable {

    //需要补抓的列表
    private String list;
    //头部名字，就是首页中某一部分模块的名字，比如：重磅推荐/奇幻言情等等
    private String headName;
    //详情页url
    private String detailUrl;

    @Override
    public SiteSourceHomepageRuleBean convertToEntityProperty(String databaseValue) {
        return GsonUtils.string2Obj(databaseValue, SiteSourceHomepageRuleBean.class);
    }

    @Override
    public String convertToDatabaseValue(SiteSourceHomepageRuleBean entityProperty) {
        return GsonUtils.obj2String(entityProperty);
    }

    public String getList() {
        return list;
    }

    public void setList(String list) {
        this.list = list;
    }

    public String getHeadName() {
        return headName;
    }

    public void setHeadName(String headName) {
        this.headName = headName;
    }

    public String getDetailUrl() {
        return detailUrl;
    }

    public void setDetailUrl(String detailUrl) {
        this.detailUrl = detailUrl;
    }

    @Override
    public String toString() {
        return "SiteSourceHomepageRuleBean{" +
                "list='" + list + '\'' +
                ", headName='" + headName + '\'' +
                ", detailUrl='" + detailUrl + '\'' +
                ", mediaType=" + mediaType +
                ", title='" + title + '\'' +
                ", author='" + author + '\'' +
                ", coverUrl='" + coverUrl + '\'' +
                ", desc='" + desc + '\'' +
                ", wordCount='" + wordCount + '\'' +
                ", state='" + state + '\'' +
                ", category='" + category + '\'' +
                ", lastChapter='" + lastChapter + '\'' +
                ", lastUpdated='" + lastUpdated + '\'' +
                '}';
    }
}
